﻿Public Class FrmTimer
    Dim numeroDeTicks As Integer
    Private Sub btnComenzar_Click(sender As System.Object, e As System.EventArgs) Handles btnComenzar.Click
        timer.Start()
        lblEstado.Text = "Encendido"
    End Sub

    Private Sub btnDetener_Click(sender As System.Object, e As System.EventArgs) Handles btnDetener.Click
        timer.Stop()
        lblEstado.Text = "Apagado"
    End Sub

    Private Sub timer_Tick(sender As System.Object, e As System.EventArgs) Handles timer.Tick
        numeroDeTicks += 1
        lblEventos.Text = "Tick " & numeroDeTicks
    End Sub

    Private Sub FrmTimer_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        webBrowser.Url = New Uri("http://msdn.microsoft.com/es-es/library/system.windows.forms.timer%28v=VS.80%29.aspx")
        rtbEjercicio.Text = My.Resources.Timer.Replace("\n", ControlChars.NewLine)
    End Sub
End Class
